STEP 12: We've counted how many time the user picked each answer option and stored those numbers in a list.

Now we can use a list tool to figure out which variable is storing the greatest number!.

  • Go to and drag Get Maximum to the bottom of your program.
  • Change the variable name to result and the list argument in max() to counts

result is an integer between 2 and 5. We asked 5 questions, so the user had to pick one option at least twice!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)